# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libhandy1
pkgver=1.8.3
pkgrel=0
pkgdesc="Library full of GTK+ widgets for mobile phones"
url="https://gitlab.gnome.org/GNOME/libhandy"
arch="all"
license="LGPL-2.0-or-later"
makedepends="
	glib-dev
	gobject-introspection-dev
	gtk+3.0-dev
	meson
	py3-setuptools
	vala
	"
checkdepends="
	adwaita-icon-theme
	ibus
	xvfb-run
	"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-lang"
source="https://download.gnome.org/sources/libhandy/${pkgver%.*}/libhandy-$pkgver.tar.xz"
builddir="$srcdir/libhandy-$pkgver"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dexamples=false \
		. output
	meson compile -C output
}

check() {
	xvfb-run -a meson test -t 3 --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
1e0ae363d2a4993c9667243715256b27cb0ecb898fa8f4ea1a914fbeb36c0a9c26447f8f13f92f5a855e45ada49f732adeb30b88d81f3ee5f984bca48db3ae65  libhandy-1.8.3.tar.xz
"
